<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8"/>
    <title>Css3实现表格隔行变色或隔列变色</title>
    <style>
        body {
            padding: 0;
            margin: 0;
            font: normal 12px/24px "\5FAE\8F6F\96C5\9ED1";
            color: #444;
        }

        table {
            width: 500px;
            border: 0;
            margin: 100px auto 0;
            text-align: center;
            border-collapse: collapse;
            border-spacing: 0;
        }

        table th {
            background: #0090D7;
            font-weight: normal;
            line-height: 30px;
            font-size: 14px;
            color: #FFF;
        }

        table tr:nth-child(odd) {
            background: #F4F4F4;
        }

        table td:nth-child(even) {
            color: #C00;
        }

        table tr:nth-child(5) {
            background: #73B1E0;
            color: #FFF;
        }

        table tr:hover {
            background: #ffffcc;
            color: #FFF;
        }

        table td, table th {
            border: 1px solid #EEE;
        }
    </style>
</head>
<body>
<table>
    <tr>
        <th>div+css</th>
        <th>SEO</th>
        <th>Javascript</th>
        <th>php</th>
    </tr>
    <tr>
        <td>div+css</td>
        <td>SEO</td>
        <td>Javascript</td>
        <td>php</td>
    </tr>
    <tr>
        <td>div+css</td>
        <td>SEO</td>
        <td>Javascript</td>
        <td>php</td>
    </tr>
    <tr>
        <td>div+css</td>
        <td>SEO</td>
        <td>Javascript</td>
        <td>php</td>
    </tr>
    <tr>
        <td>div+css</td>
        <td>SEO</td>
        <td>Javascript</td>
        <td>php</td>
    </tr>
    <tr>
        <td>div+css</td>
        <td>SEO</td>
        <td>Javascript</td>
        <td>php</td>
    </tr>
    <tr>
        <td>div+css</td>
        <td>SEO</td>
        <td>Javascript</td>
        <td>php</td>
    </tr>
</table>
</body>
</html>